/*
 * timer.h
 *
 *  Created on: 2010-12-05
 *      Author: Piotrek
 */

#ifndef TIMER_H_
#define TIMER_H_

#define TIMER_COUNT 5
#define POWER_PORT PORTA
#define POWER_DDR DDRA

#include <inttypes.h>

struct timer {
	uint8_t id;
	uint8_t hour_on;
	uint8_t min_on;
	uint8_t hour_off;
	uint8_t min_off;
};

void checkTimers(unsigned char hour, unsigned char min);
void readTimer(struct timer *timer);
void writeTimer(struct timer *timer);
void powerOn(uint8_t id);
void powerOff(uint8_t id);
uint8_t getPowerStatus(uint8_t id);

#endif /* TIMER_H_ */
